package Lambda;

import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Comparator;

public class Test {

    public static void main(String[] args) {
        String[] arr = {"a","aaa","aa","aaaa"};
        Arrays.sort(arr, (o1,o2)-> o2.length()-o1.length());
        System.out.println(Arrays.toString(arr));
    }
}
